<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>简易计算机</title>
		<link rel="stylesheet" type="text/css" href="index.css"/>
	</head>
	<body>
		<div id="app">
			<div>
				<input type="text" v-model:value="counter" class="cin_item" />
			</div>
			<div class="content">
				<div class="one">
					<div class="item" @click="add(0)">0</div>
					<div class="item" @click="add(1)">1</div>
					<div class="item" @click="add(2)">2</div>
					<div class="item" @click="add(3)">3</div>
					<div class="item" @click="add(4)">4</div>
				</div>
				<div class="two">
					<div class="item" @click="add(5)">5</div>
					<div class="item" @click="add(6)">6</div>
					<div class="item" @click="add(7)">7</div>
					<div class="item" @click="add(8)">8</div>
					<div class="item" @click="add(9)">9</div>
				</div>
				
			</div>
		</div>
	</body>
	<script src="https://unpkg.com/vue@next"></script>
	<script>
	const Counter={
		data(){
			return{
				counter:0
			}
		},
		methods:{
			add:function(s){
				this.counter+=s
			}
		}
	}
	Vue.createApp(Counter).mount('#app')
	</script>
</html>